package com.infoauto.opc.gateway.controller;

import com.infoauto.opc.gateway.entity.Result;
import com.infoauto.opc.gateway.entity.ResultCode;
import com.infoauto.opc.gateway.model.gtm4.ControlSignal;
import com.infoauto.opc.gateway.model.gtm4.ControlSignalStation;
import com.infoauto.opc.gateway.service.ControlSignalService;
import com.infoauto.opc.gateway.service.ControlSignalStationService;
import com.sun.deploy.net.URLEncoder;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * 控制信号工程
 */

@CrossOrigin
@RestController
@RequestMapping("/controlSignalStation")
public class ControlSignalStationController {
    @Autowired
    private ControlSignalStationService service;

    @RequestMapping(value="/selectList" ,method= RequestMethod.GET)
    public Result selectList(){
        try{
            List<ControlSignalStation> list = service.selectList();
            return new Result(ResultCode.SUCCESS,list);
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }

}
